#include <REGX52.H>
#include "MatrixLED.h"
#include "Delay.h"

unsigned char Animation[] = {
    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
    0x81,0xFF,0x81,0x00,0x38,0x7C,0x7E,0x3F,0x3F,0x7E,0x7C,0x38,0x00,0x3C,0x42,0x81,
    0x81,0x81,0x42,0x00,0xFF,0x08,0x10,0x0F,0x00,0x2F,0x00,0x1F,0x08,0x08,0x07,0x00,
    0x06,0x09,0x09,0x07,0x01,0x00,0x7D,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};

void main() {
    unsigned char Offset=1,count=0;
    MatrixLED_Init();
    while(1) {
        unsigned char i;
        for(i=0; i<8; i++) {
            MatrixLED_ShowColumn(i,Animation[i+Offset]);
        }
        count++;
        if(count>=10) {
            count=0;
            Offset++;
            if(Offset>48)
                Offset=0;
        }
    }
}